#-*- coding: utf-8 -*- 

import os

def execute(sql) :
        result_set=[]
        hive_line = '''hive -e 'set mapreduce.job.queuename=algorithm;use qyer;%s';'''%(sql)
        for line in os.popen(hive_line).read().split("\n") :
            if not line : continue
            fields = line.strip().split("\t")
            result_set.append(fields)
        return result_set
